package cn.sciento.starter.keyencrypt.util;

import java.util.Objects;
import cn.sciento.starter.keyencrypt.core.Encrypt;

public class EncryptUtils {
  public static boolean ignoreValue(Encrypt encrypt, String value) {
    return (encrypt != null && contain(encrypt.ignoreValue(), value));
  }
  
  private static boolean contain(String[] array, String value) {
    for (String s : array) {
      if (Objects.equals(s, value))
        return true; 
    } 
    return false;
  }
}
